VT-d: get rid of duplicated definition
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Feb 2010 19:51:15 +0000 (19:51 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Feb 2010 19:51:15 +0000 (19:51 +0000)
free_pgtable_maddr was implemented the same for x86 and IA64, so it's
not necessary to define it separately for x86 and IA64. This patch
moves free_pgtable_maddr definition to iommu.c to avoid duplicated
definition.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/ia64/vtd.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c

index 515806045768a8a98291d04be8bd6de9d4a42250..7b740d2d84f2a99ddd6540e899863ba186209648 100644 (file)
@@ -46,12 +46,6 @@ void unmap_vtd_domain_page(void *va)
     unmap_domain_page(va);
 }
 
-void free_pgtable_maddr(u64 maddr)
-{
-    if ( maddr != 0 )
-        free_domheap_page(maddr_to_page(maddr));
-}
-
 unsigned int get_cache_line_size(void)
 {
     return L1_CACHE_BYTES;
index c03e9ce3000dd110460af5d8052dbeec7090fb72..bf325a8d5fcb37bb1a3091828f31fbf7e41cc722 100644 (file)
@@ -193,6 +193,12 @@ u64 alloc_pgtable_maddr(struct acpi_drhd_unit *drhd, unsigned long npages)
     return page_to_maddr(pg);
 }
 
+void free_pgtable_maddr(u64 maddr)
+{
+    if ( maddr != 0 )
+        free_domheap_page(maddr_to_page(maddr));
+}
+
 /* context entry handling */
 static u64 bus_to_context_maddr(struct iommu *iommu, u8 bus)
 {
index c5435b6f278d39511f2868ee310ba9ae2b90c677..74e31ccb72458570ac57a3577cc4bdf39218ce9c 100644 (file)
@@ -44,12 +44,6 @@ void unmap_vtd_domain_page(void *va)
     unmap_domain_page(va);
 }
 
-void free_pgtable_maddr(u64 maddr)
-{
-    if ( maddr != 0 )
-        free_domheap_page(maddr_to_page(maddr));
-}
-
 unsigned int get_cache_line_size(void)
 {
     return ((cpuid_ebx(1) >> 8) & 0xff) * 8;